﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IocCore.CustomerContainer
{
    public interface ICustomerContainerAbstract
    {
        /// <summary>
        /// 注册服务
        /// </summary>
        /// <typeparam name="TFrom"></typeparam>
        /// <typeparam name="TTo"></typeparam>
        /// <param name="shortName"></param>
        /// <param name="paralist"></param>
        /// <param name="lifetimeType"></param>
        void Register<TFrom, TTo>(string shortName = "", object[] paralist = null, LifetimeType lifetimeType = LifetimeType.Transient) where TTo : TFrom;
        /// <summary>
        /// 获取服务
        /// </summary>
        /// <typeparam name="TFrom"></typeparam>
        /// <param name="shortName"></param>
        /// <returns></returns>
        TFrom Resolve<TFrom>(string shortName="");
        /// <summary>
        /// 创建容器实例
        /// </summary>
        /// <returns></returns>
        ICustomerContainerAbstract CreateChildContainer();
    }
}
